package com.controller;

import com.pojo.Menu;
import com.service.MenuService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Controller
public class MenuController {
    @Resource
    private MenuService menuService;

    @RequestMapping("/getMenuList")
    @ResponseBody
    public List<Menu> getMenuList(){
        List<Menu> menuList = menuService.getMenuList();

        return menuList;
    }
}
